package cn.iocoder.yudao.module.alipay.controller.app.lengyanwl;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.alipay.controller.app.lengyanwl.vo.NamePageRespVO;
import cn.iocoder.yudao.module.alipay.controller.app.lianlian.vo.LianLianOrderCreateReqVO;
import cn.iocoder.yudao.module.alipay.service.lengyanwl.NameService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

@Tag(name = "在线起名相关 - 在线起名")
@RestController
@RequestMapping("/name")
@Validated
public class NameController {

    @Resource
    private NameService nameService;

    @PostMapping("/getName")
    @Operation(summary = "宝宝在线起名")
    public CommonResult<Object> getName(@Valid @RequestBody NamePageRespVO namePageRespVO) throws Exception {
        return success(nameService.getName(namePageRespVO));
    }

    @PostMapping("/nameTest")
    @Operation(summary = "姓名测试")
    public CommonResult<Object> nameTest(@Valid @RequestBody NamePageRespVO namePageRespVO) throws Exception {
        return success(nameService.nameTest(namePageRespVO));
    }


}
